package com.thresh.blog.service.impl;

import com.thresh.blog.pojo.Blog;
import com.thresh.blog.repository.BlogRepository;
import com.thresh.blog.service.BlogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;

import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

@Service
public class BlogServiceImpl implements BlogService {
    @Autowired
    private BlogRepository blogRepository;

    @Override
    public Page<Blog> getBlogs(Pageable page) {
        return blogRepository.findAll(page);
    }
}
